package cn.shutdown.demo.thread.suspend.nosync;

/**
 * @author jiangwujie
 * @date 2021/8/8
 */
public class Run {
    public static void main(String[] args) {
        MyObject myObject = new MyObject();
        Thread thread1 = new Thread() {
            @Override
            public void run() {
                myObject.setUserNameAndPassword("aaa", "88888888");
            }
        };
        thread1.setName("a");
        thread1.start();
        Thread thread2 = new Thread() {
            @Override
            public void run() {
                myObject.printUsernameAndPassword();
            }
        };
        thread2.start();
    }
}
